import { ref } from 'vue'
import type { DurationTrendData } from '../types'
import { useChartData } from './useChartData'

export function useDurationTrendData() {
  const { generateDurationData } = useChartData()
  
  const mockConfig = {
    startDate: '2024-02-09',
    endDate: '2024-12-31',
    dataPoints: 50
  }

  const durationTrendData = ref<DurationTrendData>({
    shortTermBondFunds: {
      name: '短期纯债基金',
      data: generateDurationData(mockConfig),
      color: '#3B82F6'
    },
    mediumLongTermBondFunds: {
      name: '中长期纯债基金',
      data: generateDurationData(mockConfig),
      color: '#F59E0B'
    }
  })

  return {
    durationTrendData
  }
}
